package o;

import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import com.huawei.appmarket.service.predownload.jobservice.WlanPeriodicJobService;

public class dqe extends dpu {
    protected /* synthetic */ Object ॱ(Context context) throws InterruptedException {
        return ˋ(context);
    }

    public dqe() {
        this.ˊ = "NetChangeAppsUpdateTask";
    }

    public static boolean ˋ() {
        long ˏ = dss.ॱ().ˏ();
        return ˏ == 0 || ˏ + WlanPeriodicJobService.DEFAULT_JOB_PERIODIC < System.currentTimeMillis();
    }

    protected b ˋ(Context context) {
        if (ˋ()) {
            NetworkInfo activeNetworkInfo = ((ConnectivityManager) ContentManager.getInstant().getContext().getSystemService("connectivity")).getActiveNetworkInfo();
            if (activeNetworkInfo != null && activeNetworkInfo.isConnected() && dno.ॱ(activeNetworkInfo.getType()) && !doo.ᐝ(ContentManager.getInstant().getContext())) {
                return b.EXECUTE;
            }
            Logger.ˎ(this.ˊ, "can not find wifi network.");
            return b.NO_EXECUTE;
        }
        Logger.ˎ(this.ˊ, "last update is less than 2 hours");
        return b.NO_EXECUTE;
    }
}
